welo git mirrors
Commit 5fdea09c4ee193f99cd5512f1a8d81c363b4012e
Parents : 80ef6c0
Author : welo | main nixos computer <empty@empty.com>
Date : 2026-07-08T18:26:49+01:00
removed most print statements
Changes
Diff
diff --git a/src/frame.rs b/src/frame.rs
index 796b89f..512f7c7 100644
--- a/src/frame.rs
+++ b/src/frame.rs
@@ -90,7 +90,7 @@ impl Frame {
/// Encode a frame into bytes (wire format).
pub fn encode(&self) -> Vec<u8> {
let len = self.payload.len() as u16;
- info!("len: {}", self.payload.len());
+ // info!("len: {}", self.payload.len());
let mut buf = Vec::with_capacity(HDR_SIZE + self.payload.len());
buf.push(self.frame_type as u8);
buf.extend_from_slice(&self.session_id.to_be_bytes());
@@ -139,7 +139,7 @@ pub fn ad() {
/// Build a CONNECT frame payload: `[1 byte host_len][host bytes][2 bytes port BE][1 bytes settings]`
/// currently the byte setting only denotes udp but could be used for more in the future
-/// ignore any other bit other than that most significant.
+// ignore any other bit other than that most significant.
pub fn encode_connect_payload(host: &str, port: u16, udp: bool) -> Vec<u8> {
let h = host.as_bytes();
let mut buf = Vec::with_capacity(1 + h.len() + 2);
diff --git a/src/mux.rs b/src/mux.rs
index 5504d9d..f561672 100644
--- a/src/mux.rs
+++ b/src/mux.rs
@@ -128,7 +128,7 @@ impl MuxHandle {
// Send in LINK_MDU-sized chunks
for chunk in encoded.chunks(LINK_MDU) {
- println!("chunk: {:?} sid: {}",chunk, frame.session_id);
+ // println!("chunk: {:?} sid: {}",chunk, frame.session_id);
if let Err(e) = node.send_on_link(link_id.0, chunk.to_vec(), DATA_CONTEXT) {
warn!("Failed to send link data: {:?}", e);
return;
@@ -139,7 +139,7 @@ impl MuxHandle {
/// Convenience: send a typed frame.
pub fn send(&self, frame_type: FrameType, session_id: u32, payload: Vec<u8>) {
- info!("send frame");
+ // info!("send frame");
self.send_frame(&Frame::new(frame_type, session_id, payload));
}
@@ -164,7 +164,7 @@ impl MuxHandle {
pub fn receive_data(&self, data: &[u8]) -> Vec<Frame> {
let mut buf = self.inner.recv_buf.lock().unwrap();
buf.extend_from_slice(data);
- info!("buf: {:?}", buf);
+ // info!("buf: {:?}", buf);
let mut frames = Vec::new();
loop {
Served by rngit 1.4.2 - Generated in 0.03s